package com.munhrasoft.dinamica.business.entities;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;

@Entity
@NamedQueries(value = { @NamedQuery(name = "findAllCRILines", query = "SELECT lines FROM CustoCRI lines"),
        @NamedQuery(name = "findCustoCRI", query = "SELECT line FROM CustoCRI line where " +
        		":valor >= line.intervalomin and :valor <= line.intervalomax") })
@SequenceGenerator(name = "custocriSeq", initialValue = 1, allocationSize = 1)
public class CustoCRI {

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "custocriSeq")
	private int id_custonotas;
	private double intervalomin;
	private double intervalomax;
	private double custo;

	public int getId_custonotas() {
		return id_custonotas;
	}

	public void setId_custonotas(int id_custonotas) {
		this.id_custonotas = id_custonotas;
	}

	public double getIntervalomin() {
		return intervalomin;
	}

	public void setIntervalomin(double intervalomin) {
		this.intervalomin = intervalomin;
	}

	public double getIntervalomax() {
		return intervalomax;
	}

	public void setIntervalomax(double intervalomax) {
		this.intervalomax = intervalomax;
	}

	public double getCusto() {
		return custo;
	}

	public void setCusto(double custo) {
		this.custo = custo;
	}

}
